﻿package main

import (
    "fmt"
    "strconv"
)

func main(){
    fmt.Print("请输入要转成整数的字符串：")
    var s string
    fmt.Scanf("%s", &s)
    i, e := strconv.Atoi(s)
    fmt.Println("数值：", i)
    //fmt.Println("错误", e)
    if e != nil {
        fmt.Println(e)
    }
}